Engineering E cient Code Generators using Tree Matching and Dynamic Programming
نویسندگان
چکیده
Many code generator generators use tree pattern matching and dynamic programming. This note describes a simple program that generates matchers that are fast, compact, and easy to understand. It is simpler than common alternatives: 200{700 lines of Icon versus 3000 lines of C for Twig and 5000 for burg. Its matchers run up to 25 times faster than Twig's. They are necessarily slower than burg's BURS (bottom-up rewrite system) matchers but they are more exible and still practical. AT&T Bell Laboratories, 600 Mountain Avenue 2C-464, Murray Hill, NJ 07974 Department of Computer Science, The University of Arizona, Tucson, AZ 85721
منابع مشابه
An Eecient Bottom-up Tree Pattern Matching for Code Selection That Does Dynamic Programming at Compile-time
An e cient tree pattern matching with dynamic programming for selecting the optimal code is proposed. It is devised through a close examination of some relation over tree patterns. The scheme is more e cient than other works in the sense that it performs less unfruitful tests and the code size of it is smaller. Its rationale is also intuitively clear and natural. Furthermore, the relevant analy...
متن کاملAn Eecient Method of Constructing States in Bottom-up Tree Pattern Matching
In this paper, we propose an e cient method of constructing states in bottom-up tree pattern matching with dynamic programming technique for optimal code generation. This method can be derived from some relations over tree patterns. The proposed scheme is more e cient than other scheme because we can avoid unfruitful tests with the smaller size of the scheme. Furthermore, the relevant analyses ...
متن کاملOn the Automatic Generation of Instruction Selector Using Bottom-Up Tree Pattern Matching
Code generation in uences the e ciency of not only the compiled program but also the compilation process. The appearence of the many new processors has created the need of automating the code generation phase. The instruction selection is a important component to be poduced automatically in the code generation phase. The tools for automating the instruction selection usually use the tree-struct...
متن کاملCompiling Natural Semantics - ReadingSample
Natural semantics has become a popular tool among programming language researchers. It is used for specifying many aspects of programming languages, including type systems, dynamic semantics, translations between representations, and static analyses. The formalism has so far largely been limited to theoretical applications, due to the absence of practical tools for its implementation. Those who...
متن کاملA Hybrid Dynamic Programming for Inventory Routing Problem in Collaborative Reverse Supply Chains
Inventory routing problems arise as simultaneous decisions in inventory and routing optimization. In the present study, vendor managed inventory is proposed as a collaborative model for reverse supply chains and the optimization problem is modeled in terms of an inventory routing problem. The studied reverse supply chains include several return generators and recovery centers and one collection...
متن کامل